package com.liusand.mapper;

import com.liusand.pojo.Category;
import com.liusand.service.CategoryService;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author :liusha
 * packageName :com.liusand.mapper
 * fileName :CategoryMapper
 * creationTime :2022/11/22 10:48
 */
@Mapper
public interface CategoryMapper {
    List<Category> page(@Param("start") Integer start, @Param("pageSize") Integer pageSize);

    Long countPage();

    int saveCategory(Category category);

    Category findByName(@Param("name") String name);

    Category findCategoryById(@Param("id") String id);

    int deleteCategoryById(@Param("id") String id);

    int updateCategory(Category category);

    List<Category> list(@Param("type") Integer type);
}
